<?php
    // this is the standard template data
    $templateData = array(
                    'title' => $this->descriptionHelper->getTitle($this->resourceUri),
                    'resourceUri' => $this->resourceUri,
                    'description' => $this->description[$this->resourceUri],
                    'descriptionHelper' => $this->descriptionHelper,
                    'options'           => $this->options
            );
?><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
    xmlns:dc="http://purl.org/dc/terms/"
    xmlns:foaf="http://xmlns.com/foaf/0.1/">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="generator" content="<?php echo $this->generator ?>" />
    <link rel="alternate" type="application/rdf+xml" href="<?php echo $this->resourceUri ?>.rdf" />
    <link rel="pingback" href="<?php echo $this->pingbackUri ?>" />

    <link
        rel="<?php echo $this->curie('http://xmlns.com/foaf/0.1/primaryTopic') ?>"
        href="<?php echo $this->resourceUri?>" />

    <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUri ?>/css/styleimports.css" media="all" title="Standard" />
    <!--[if lte IE 6]>
        <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUri ?>/css/patches/ie6.css" media="all" />
    <![endif]-->

    <!-- jQuery -->
    <script type="text/javascript" src="<?php echo $this->themeUrlBase ?>scripts/libraries/jquery.js"></script>
    <script type="text/javascript" src="<?php echo $this->themeUrlBase ?>scripts/libraries/jquery-ui.js"></script>
    
    <!--script type="text/javascript" src="<?php echo $this->libraryUrlBase ?>RDFauthor/src/rdfauthor.js"></script-->

    <!--script type="text/javascript" src="<?php echo $this->baseUri ?>/js/jquery-fluid16.js"></script-->
    
    <script type="text/javascript" src="<?php echo $this->baseUri ?>/js/jquery.cycle.js"></script>
    
    <title><?php echo $this->descriptionHelper->getTitle($this->resourceUri) ?> &mdash; <?php echo $this->site['name'] ?></title>

    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-241023-23']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>
<?php    
    // check for exhibit data URI and integrate this as well as exhibit
    if (isset($this->description[$this->resourceUri]['http://lod2.eu/schema/exhibitData'])) {
        echo '  <script src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js" type="text/javascript"></script>' .PHP_EOL;
        foreach ($this->description[$this->resourceUri]['http://lod2.eu/schema/exhibitData'] as $property) {
            if (isset($property['value'])) {
                echo '  <link href="'.$property['value'].'" type="application/jsonp" rel="exhibit/data" ex:jsonp-callback="cb" />' .PHP_EOL;
            }
        }
    }
?>    
    <?php $this->headScript() ?>
</head>
<body<?php 
    foreach ($this->namespaces as $prefix => $ns): ?><?php echo ' xmlns:' . $prefix . '="' . $ns . '"' ?><?php endforeach; ?>>
<?php
    function printNavi($navi, $titleHelper, $depth, $view){
        if(is_array($navi) && count($navi)>0):?>
            <ul class="depth_<?php echo $depth; ?>">
                <?php foreach ($navi as $navitem) :?>
                <li>
                    <a href="<?php echo $view->url($navitem->uri) ?>">
                        <?php
                            /* for($i=0; $i< $depth; $i++){echo "&nbsp;&nbsp;";}*/
                            if (isset($navitem->altLabel)) {
                                echo $navitem->altLabel;                                                                
                            } else {
                                echo $titleHelper->getTitle($navitem->uri);                                
                            }
                        ?></a>
                        <?php printNavi($navitem->subconcepts, $titleHelper, $depth+1, $view); ?>
                </li>
                <?php endforeach; ?>
             </ul>
       <?php endif; 
   }

?>

  <!-- start: skip link navigation -->
  <!-- a class="skip" title="skip link" href="#content">Skip to the content</a><span class="hideme">.</span -->
  <!-- end: skip link navigation -->
  <div class="page_margins">
    <div class="page" about="<?php echo $this->resourceUri?>">
      <div id="header">
        <h1 id="logo">
            <a href="<?php echo $this->site['index'] ?>">
                <?php echo $this->site['name_encoded'] ?>
            </a>
        </h1> <!-- /#logo -->
        <div id="topnav">
            <ul>
                <!-- li><a href="#">Sitemap</a></li -->
                <!-- li><a href="#">Contact Us</a></li -->
                <li><a href="http://lod2.eu/Article/Imprint.html">Imprint</a></li>
                <li><a rel="nofollow" href="<?php echo $this->wikiBaseUri ?>view?r=<?php echo urlencode($this->resourceUri) ?>">Log In/Edit</a></li>
            </ul>
        </div> <!-- /#topnav -->
      </div>
      <div id="nav" class="clearfix">
        <!-- skiplink anchor: navigation -->
        <a id="navigation" name="navigation"></a>
          <!-- main navigation: horizontal list -->
          <!-- ul -->
          <?php printNavi($this->navigation, $this->descriptionHelper, 0, $this); ?>
            <!-- li class="search"><a href="#">Keyword search</a></li -->
          <!-- /ul -->
      </div>

      <hr class="hideme" />

      <!-- p id="breadcrumb">
        <dfn class="hideme">You are here:</dfn>
        <a href="#">Consortium</a> &gt;
        <a href="#">Partner</a> &gt;
        <strong>Articles</strong>
      </p -->

      <hr class="hideme" />

      <div id="main">
        <div id="col1">
          <div id="col1_content" class="clearfix">
            <!-- add your content here -->
            
            <h2 class="hideme_not main"><?php echo $this->descriptionHelper->getTitle($this->resourceUri) ?></h2>
            
            <?php echo $this->partial('lod2/main.phtml', $templateData) ?>
            <?php echo $this->partial('lod2/query.phtml', $templateData) ?>

          </div> <!-- /#col1_content -->
                    
        </div> <!-- /#col1 -->

        <hr class="hideme" />

        <div id="col3">
          <div id="col3_content" class="clearfix sidecontent">
            <!-- add your content here -->
            <?php echo $this->partial('lod2/content-side-top.phtml', $templateData) ?>
            <?php echo $this->partial('lod2/testimonials.phtml', $templateData) ?>
            <?php echo $this->partial('lod2/feed.phtml', $templateData) ?> <!-- NEWS -->
            
            <!-- div class="section">
                <h3>Minimap</h3>
                <div class="section-content">
                    <?php // echo $this->module('minimap', array('noChrome' => true)); ?>
                </div>
            </div>
            <div class="section">
                <h3>Linking Resources</h3>
                <div class="section-content">
                    <?php // echo $this->module('linkinghere', array('noChrome' => true)); ?>
                </div>
            </div -->
            
            <?php // NEARBY
            $nearby = trim($this->module('similarinstances', array('noChrome' => true)));
            
            if ($nearby && $this->resourceUri !== 'http://lod2.eu/Welcome'):
            ?>
            <div class="section">
                <h3>Nearby</h3>
                <div class="section-content">
                    <?php echo $nearby; ?>
                </div>
            </div>
            <?php endif; ?>

            <?php if ($this->resourceUri == 'http://lod2.eu/Welcome'): ?>
            <div class="section">
                <h3>Last Changes</h3>
                <div class="section-content">
                    <?php echo $this->module('lastchanges', array('noChrome' => true)); ?>
                </div>
            </div>
            <?php endif; ?>

            <?php echo $this->partial('lod2/content-side-bottom.phtml', $templateData) ?>
          </div> <!-- /#col3_content -->
          <!-- IE Column Clearing -->
          <div id="ie_clearing"> &#160; </div>
        </div> <!-- /#col3 -->
      </div>

      <hr class="hideme" />

      <div id="footer">
        <p>
            See <a href="<?php echo $this->wikiBaseUri ?>source/edit?r=<?php echo $this->resourceUri ?>">page source</a>,
            <?php echo $this->partial('lod2/lastchange.phtml', $this->lastchange($this->resourceUri)); ?>
            </p>
        <p class="sublkine">This page is powered by the <a href="http://lod2.eu/WikiArticle/AboutTheWebsite.html">LOD2 stack</a>, 
            <a href="http://www.yaml.de/" title="YAML is an (X)HTML/CSS framework for creating modern and flexible floated layouts."><abbr title="Yet Another Multicolumn Layout">YAML</abbr></a> and
            <a href="jquery.com" title="jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.">jQuery</a>.
            <a id="sfp-logo" href="#"><span class="hideme">publicly sponsored by Seventh Framework Program</span></a>
        </p>
        <!--p class="subline">
            This page is powered by
            <a href="http://ontowiki.net/" title="OntoWiki is a Semantic Data Wiki enabling the collaborative creation and (linked data) publication of RDF knowledge bases."><?php echo $this->generator ?></a>,
            <a href="http://virtuoso.openlinksw.com/" title="Virtuoso is an innovative enterprise grade multi-model data server for agile enterprises &amp; individuals.">Virtuoso</a>,
            <a href="http://www.yaml.de/" title="YAML is an (X)HTML/CSS framework for creating modern and flexible floated layouts."><abbr title="Yet Another Multicolumn Layout">YAML</abbr></a> and
            <a href="jquery.com" title="jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.">jQuery</a>.
            <a id="sfp-logo" href="#"><span class="hideme">publicly sponsored by Seventh Framework Program</span></a>
        </p-->
      </div>
    </div>
  </div>

</body>
</html>
